//
//  demandfirstTableViewCell.m
//  BAOASystem
//
//  Created by michael on 2018/3/6.
//  Copyright © 2018年 czd. All rights reserved.
//

#import "demandfirstTableViewCell.h"

@implementation demandfirstTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
//  _cyleView = [[xqcollectionviewfirst alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, 150)];
//   [self.contentView addSubview:_cyleView];
// _label = [[UILabel alloc]init];
//    _label.frame = CGRectZero;
//        _label.numberOfLines = 0;
//        _label.textColor = [UIColor colorWithHexString:@"484848"];
//      [_label setFont:[UIFont systemFontOfSize:15]];
//       [self.contentView addSubview:_label];

 _label1 = [[UILabel alloc]init];
    _label1.frame = CGRectZero;
        _label1.numberOfLines = 0;
        _label1.textColor = [UIColor colorWithHexString:@"484848"];
      [_label1 setFont:[UIFont systemFontOfSize:15]];
       [self.contentView addSubview:_label1];
    
       _label2 = [[UILabel alloc]init];
    _label2.frame = CGRectZero;
    _label2.numberOfLines = 0;
    _label2.textColor = [UIColor colorWithHexString:@"a1a1a1"];
      [_label2 setFont:[UIFont systemFontOfSize:12]];
       [self.contentView addSubview:_label2];
    
       _label3 = [[UILabel alloc]init];
    _label3.frame = CGRectZero;
        _label3.numberOfLines = 0;

    _label3.textColor = [UIColor colorWithHexString:@"a1a1a1"];
      [_label3 setFont:[UIFont systemFontOfSize:12]];
       [self.contentView addSubview:_label3];
    
 _label4 = [[UILabel alloc]init];
         _label4.numberOfLines = 0;

    _label4.frame = CGRectZero;
        _label4.textColor = [UIColor colorWithHexString:@"a1a1a1"];

      [_label4 setFont:[UIFont systemFontOfSize:12]];
       [self.contentView addSubview:_label4];
_label5 = [[UILabel alloc]init];
         _label5.numberOfLines = 0;

    _label5.frame = CGRectZero;
            _label5.textColor = [UIColor colorWithHexString:@"a1a1a1"];

      [_label5 setFont:[UIFont systemFontOfSize:12]];
       [self.contentView addSubview:_label5];
//_button  = [UIButton buttonWithType:UIButtonTypeCustom];
//[_button setImage:[UIImage imageNamed:@"购物车图标"] forState:UIControlStateNormal];
//[_button addTarget:self action:@selector(action) forControlEvents:UIControlEventTouchUpInside];
//[self.contentView addSubview:_button];
//UIButton *backbutton = [UIButton buttonWithType:UIButtonTypeCustom];
//[backbutton setImage:[UIImage imageNamed:@"返回"] forState:UIControlStateNormal];
//[backbutton addTarget:self action:@selector(backaction) forControlEvents:UIControlEventTouchUpInside];
//[self.contentView addSubview:backbutton];

}

return self;

}
- (void)backaction{
[self.ViewController.navigationController popViewControllerAnimated:YES];
}
- (void)layoutSubviews
{
[super layoutSubviews];

_label1.frame = CGRectMake(0, 0, KScreenWidth, 30) ;
_label1.text = _dict[@"title"];
_label1.textAlignment = 1;
//_button.frame = CGRectMake(KScreenWidth-30, 140, 20, 20);
_label2.frame = CGRectMake(10, _label1.bottom,( KScreenWidth-20)/2, 30);
_label2.text = [NSString stringWithFormat:@"%@%@",NSLocalizedString(@"采购信息-采购类目", nil),_dict[@"category"]];
_label3.frame = CGRectMake(_label2.right, _label1.bottom,(KScreenWidth-20)/2, 30);
_label3.text = [NSString stringWithFormat:@"%@%@",NSLocalizedString(@"采购信息-类型", nil),_dict[@"type"]];
_label3.textAlignment = 2;

_label4.frame = CGRectMake(10, _label3.bottom,(KScreenWidth-20)/2-50, 30);
_label4.text = [NSString stringWithFormat:@"%@%@",NSLocalizedString(@"采购信息-发布日期", nil),_dict[@"createDate"]];
_label5.frame = CGRectMake(_label4.right, _label3.bottom,(KScreenWidth-20)/2+50, 30);
_label5.text = [NSString stringWithFormat:@"%@%@",NSLocalizedString(@"采购信息-有效期", nil),_dict[@"validity"]];
_label5.textAlignment = 2;


}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end

